﻿<%@ Page Title="" Language="VB" MasterPageFile="~/MainLayout.master" AutoEventWireup="false" CodeFile="transact.aspx.vb" Inherits="transact" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<h1>Property Transact</h1>
<hr />
<asp:Label ID="lblStaffUID" runat="server" Visible="false" />
<asp:Label ID="lblStaffType" runat="server" Visible="false" />
<asp:Label ID="lblPropertyUID" runat="server" Visible="false" />
<div  runat="server" id="divError" class="msg-box-error" visible="false">
    <span class="title">Error</span><br />
    <asp:Label ID="lblMsgError" runat="server" Text="ERROR" /><br/>
</div>
<div  runat="server" id="divSuccessful" class="msg-box-success" visible="false">
    <span class="title">Success</span><br />
    <asp:Label ID="lblMsgSuccessful" runat="server" Text="Success" /><br/>
</div>
<p><%--Description of the page--%></p>
<div class="General-info-Container">
    <table  cellpadding="0" cellspacing="5" width="100%">
    	<tr><td colspan="2"><table width="100%"><tr><td class="General-info-title" style="width:150px;"><h3>General Informations</h3></td><td><div class="General-info-title-line"></div></td></tr></table></td></tr>
        <tr valign="top">
            <td valign="top" style="width:250px">
                 <div  >
                     <table class="General-info-table " id="divContentGeneral" cellpadding="0" cellspacing="0">
                        <tr>
                            <th scope="row" >Address :</th>
                            <td><asp:Label ID="lblAddress" runat="server"  Font-Size="12px" /></td>
                        </tr>
                        <tr id="TRProject" runat="server">
                            <th scope="row" >Project :</th>
                            <td><asp:Label ID="lblProject" runat="server" Font-Size="12px" /></td>
                        </tr>
                        <tr>
                            <th scope="row" >Property Type :</th>
                            <td><asp:Label ID="lblPropertyType" runat="server" Font-Size="12px" /></td>
                        </tr>
                        <tr>
                            <th scope="row" >LA(SQ FT) :</th>
                            <td><asp:Label ID="lblLASQFT" runat="server" Font-Size="12px" /></td>
                        </tr>
                        <tr>
                            <th scope="row" >BU(SQ FT) :</th>
                            <td><asp:Label ID="lblBUSQFT" runat="server" Font-Size="12px" /></td>
                        </tr>
                     </table>
                </div>
            </td>
        </tr>
        <tr>
          <td colspan="2">&nbsp;</td></tr>
    </table>
</div>

<div class="General-info-Container">
    <table  cellpadding="0" cellspacing="5" width="100%">
        <tr><td colspan="2"><table width="100%"><tr><td class="General-info-title" style="width:150px;"><h3>Transact Information</h3></td><td><div class="General-info-title-line"></div></td></tr></table></td></tr>
        <tr valign="top">
            <td valign="top" >
                <div>
                    <table class="General-info-table " cellpadding="0" cellspacing="0">
                        <tr>
                            <th scope="row">Transact Type :</th>
                            <td>
                                <asp:DropDownList ID="ddlTransactType" runat="server" onChange="CheckDisplay()">
                                    <%--<asp:ListItem Text="Sales" Value="1" />
                                    <asp:ListItem Text="Rent" Value="2" />--%>
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="rfvddlTransactType" ControlToValidate="ddlTransactType"
                                    SetFocusOnError="true" runat="server" ValidationGroup="Transact" ErrorMessage="<br />*Required"
                                    ForeColor="Red" Display="Dynamic" />
                            </td>
                        </tr>
                        <tr id="Transactor" runat="server">
                            <th scope="row">Transactor :</th>
                            <td>
                                <asp:DropDownList ID="ddlTransactor" runat="server" />
                                 <asp:RequiredFieldValidator ID="rfvddlTransactor" ControlToValidate="ddlTransactor"
                                    SetFocusOnError="true" runat="server" ValidationGroup="Transact" ErrorMessage="<br />*Required"
                                    ForeColor="Red" Display="Dynamic" />
                            </td>
                        </tr>
                        <tr id="CoBroke" runat="server">
                            <th scope="row">Co-Broke :</th>
                            <td><asp:DropDownList ID="ddlCoBroke" runat="server" /></td>
                        </tr>
                        <tr id="TransDate" runat="server">
                            <th scope="row">Transaction Date :</th>
                            <td valign="top">
                                <asp:TextBox ID="txtTransDate" runat="server" onKeyPress="javascript: return false;" onPaste="javascript: return false;" style=" vertical-align:bottom;" />
                                <asp:ImageButton runat="Server" ID="imgTransDateCal" ImageUrl="~/images/style01/Btn-calendar.png" AlternateText="Click to show calendar"  style=" vertical-align:middle;"/>
                                <cc1:CalendarExtender ID="ceTransDate" runat="server" Format="dd-MMM-yyyy" TargetControlID="txtTransDate" PopupButtonID="imgTransDateCal" />                            
                                <asp:RequiredFieldValidator ID="rfvtxtTransDate" runat="server" ControlToValidate="txtTransDate" ErrorMessage="<br />*Required" ForeColor="Red" CssClass="ErrorMsg" Display="Dynamic" ValidationGroup="Transact" />
                            </td>
                                
                        </tr>
                        <tr id="Remark" runat="server">
                            <th scope="row">Remark :</th>
                            <td valign="top">
                                <asp:TextBox ID="txtRemark" runat="server" TextMode="MultiLine" Height="100px" />
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
        <tr>
            <td colspan="2">&nbsp;</td>
        </tr>
    </table>
</div>
 <div class="Confirmation-Container">
        <table width="100%" style="margin-left:0px; margin-bottom:25px;">
                        <tr>
                            <td><div class="General-info-title-line"></div></td>
                            <td style="width:170px;">
                                &nbsp;<asp:Button ID="btnBack" runat="server" Text="Back" CssClass="search-btn" Width="60"/>
                                &nbsp;<asp:Button ID="BtnTransact" runat="server" Text="Transact" ValidationGroup="Transact" CssClass="search-btn" Width="80" /> &nbsp; <asp:Button ID="btnSubmit" runat="server" Text="Submit" CssClass="search-btn" style="display:none"/>
                               
                                <cc1:ConfirmButtonExtender ID="CBEBack" runat="server" TargetControlID="btnBack" />
                            </td>
                            <td style="width: 60px"><div class="General-info-title-line"></div></td>
                        </tr>
                    </table>

</div>
<script language="javascript" type="text/javascript">
function CheckDisplay() {
    var Transactor = document.getElementById('<%=Transactor.ClientID %>');
    var CoBroke = document.getElementById('<%=CoBroke.ClientID %>');
    var TransDate = document.getElementById('<%=TransDate.ClientID %>');
    var Remark = document.getElementById('<%=Remark.ClientID %>');
    var ddlTransactType = document.getElementById('<%=ddlTransactType.ClientID %>');
    var BtnTransact = document.getElementById('<%=BtnTransact.ClientID %>');
    var BtnSubmit = document.getElementById('<%=btnSubmit.ClientID %>');

    if (ddlTransactType.options[ddlTransactType.selectedIndex].value == '2' || ddlTransactType.options[ddlTransactType.selectedIndex].value == '3' || ddlTransactType.options[ddlTransactType.selectedIndex].value == '5' || ddlTransactType.options[ddlTransactType.selectedIndex].value == '6' || ddlTransactType.options[ddlTransactType.selectedIndex].value == '7') {
        Transactor.style.display = "none";
        Transactor.style.visibility = "hidden";
        CoBroke.style.display = "none";
        CoBroke.style.visibility = "hidden";
        TransDate.style.display = "none";
        TransDate.style.visibility = "hidden";  
        Remark.style.display = "none";
        Remark.style.visibility = "hidden";  
        BtnTransact.style.display = "none";
        BtnTransact.style.visibility = "hidden"; 
        BtnSubmit.style.display = "inline";
        BtnSubmit.style.visibility = "visible";    
    }
    else {
        Transactor.style.display = "inline";
        Transactor.style.visibility = "visible";
        CoBroke.style.display = "inline";
        CoBroke.style.visibility = "visible";
        TransDate.style.display = "inline";
        TransDate.style.visibility = "visible";     
        Remark.style.display = "inline";
        Remark.style.visibility = "visible";  
         BtnTransact.style.display = "inline";
        BtnTransact.style.visibility =  "visible";   
        BtnSubmit.style.display = "none";
        BtnSubmit.style.visibility = "hidden";               
    }
    }
</script>
</asp:Content>

